<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改用户</title>
<link rel="stylesheet" href="${pageContext.request.contextPath }/static/css/useradd.css" />
</head>
<body>
	<div class="div01">
			<p>系统设置  >> 用户管理  >> 修改用户信息</p>
			<div class="div02">
				
				<ul>
					<form method="post" action="${pageContext.request.contextPath }/saveUpd.html">
					<input type="text" hidden="hidden" id="id" name="id" value="${user.id }"/>
					<li>
						<span class="span">用户编码：</span>
						<input type="text" id="user_code" name="user_code" readonly="readonly" value="${user.user_code }" />
						<span class="span02">*</span>
					</li>
					<li>
						<span class="span">用户名称：</span>
						<input type="text" id="user_name" name="user_name" value="${user.user_name }" />
						<span class="span02">*</span>
					</li>
					<li>
						<span class="span">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：</span>
						<input type="text" id="user_password" name="user_password" value="${user.user_password }" />
						<span class="span02">*</span>
					</li>
					<li>
						<span class="span">用户角色：</span>
						<select id="user_role" name="user_role">
			            	<c:if test="${roleList != null }">
									   <option value="0">--请选择--</option>
									   <c:forEach var="role" items="${roleList}">
									   		<option <c:if test="${role.role_id == user.user_role }">selected="selected"</c:if>
									   		value="${role.role_id}">${role.role_name}</option>
									   </c:forEach>
									</c:if>
			        	</select>
						<span class="span02">*</span>
					</li>
					<li>
						<span class="span">所属部门：</span>
						<select id="user_dm" name="user_dm">
			            	<c:if test="${depList != null }">
									   <option value="0">--请选择--</option>
									   <c:forEach var="dep" items="${depList}">
									   		<option <c:if test="${dep.id == user.user_dm }">selected="selected"</c:if>
									   		value="${dep.id}">${dep.oz_name}</option>
									   </c:forEach>
									</c:if>
			        	</select>				
						<span class="span02">*</span>
					</li>
					<li>
						<span class="span">联系电话：</span>
						<input type="text" id="user_phone" name="user_phone" value="${user.user_phone }" />
					</li>
					
					
					<li class="button">
						<input class="input" type="submit" id="adduser" name="adduser"  value="保存" />
						<input type="button" id="back" name="back" onclick="javascript:history.back()" value="返回" />
					</li>
					</form>
				</ul>
				
			</div>
		</div>
</body>
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/system/person.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/system/adduser.js"></script>

</html>